#include <iostream>
#include <string>
#include <fstream>
#include <tchar.h>
#include <time.h>

typedef std::basic_string<_TCHAR> string;

int _tmain(int argc, _TCHAR* argv[])
{
    if (argc < 2)
        return 0;

    string inFile = argv[1];
    string outFile = inFile + _T(".par");
    if (argc >= 3)
        outFile = argv[2];

    // fake parsing
    std::ofstream fout(outFile.c_str());
    if (!fout.is_open())
        return -1;

    srand((unsigned int)time(NULL));
    int count = rand() % 10 + 5;

    fout<<"# property=value"<<std::endl;
    for (int i = 0; i < count; i++)
    {
        fout<<"property"<<i<<" = "<<"value "<<rand() % 10<<std::endl;
    }

    fout.close();
    return 0;
}